package com.hl.toolkit.server.tycoin.trate.slaveservice;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import com.tycoin.trate.slaveentity.TycoinTradeOrder;
import com.tycoin.trate.slaverepository.TycoinTradeOrderRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(readOnly = true)
public class TycoinTradeOrderService extends AbstractService<TycoinTradeOrder, Long> {

	
	  @Autowired
	    private TycoinTradeOrderRepository tycoinTradeOrderRepository;
	
	@Override
	public AbstractRepository<TycoinTradeOrder, Long> getRepository() {
		
 		return tycoinTradeOrderRepository;
 		
	}
	
	
 	public Page<TycoinTradeOrder> getTycoinTradeOrderForCoinType(String coinType,String userId,int status,Pageable pageable){
  		return  tycoinTradeOrderRepository.getTycoinTradeOrderForCoinType(coinType, userId, status,pageable);
  		 
	}
 	
 	public List<TycoinTradeOrder> getTycoinTradeOrderForCoinTypeList(String coinType,int status){
  		return  tycoinTradeOrderRepository.getTycoinTradeOrderForCoinTypeList(coinType, status);
  		 
	}
	 
 	public Page<TycoinTradeOrder> getTycoinTradeOrderForSize(String coinType,String userId,Pageable pageable){
  		return  tycoinTradeOrderRepository.getTycoinTradeOrderForSize(coinType, userId,pageable);
  		 
	}
 	
	 
 }
